package cn.wyl.feignclient;

import cn.wyl.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 调用用户服务的客户端接口
 */
@FeignClient(value = "user-server",fallbackFactory =UserFeignClientFallbackFactory.class )
public interface UserFeignClient {
    @RequestMapping("/user/{id}")
    User getById(@PathVariable("id") Long id);
}
